package cn.com.qtgl.userfilters.model.entity;

import cn.melonlib.cores.commons.model.entity.StringIdEntity;
import cn.melonlib.cores.commons.model.entity.TenantRecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.annotation.Resource;
import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("UserFilter用户信息")
@Entity(name = "DbUserItem")
@Table(name = "sec_db_user_item")
public class DbUserItem extends TenantRecordEntity {

    @ModelComment("用户账户(或者openid)")
    private String code;

    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.LAZY)
    @JoinColumn(name = "userfilter_id")
    private DbUserFilter dbUserFilter;
}
